<?php
/************************FoxPHP威客系统************************/
/*                                                            */
/*  FoxPHP.Com (C)2006-2016 FoxPHP Inc.                       */
/*  This is NOT a freeware, use is subject to license terms   */
/*  FoxPHP威客系统是商业软件,使用于商业用途请购买授权         */
/*  V3.0 2016.3                                               */
/*  foxphp@aliyun.com                                         */
/*  http://www.foxphp.com                                     */
/*                                                            */
/**************************************************************/

namespace Admin\Model;
use Think\Model;

class AuthRuleModel extends AdminModel {
	
	//字段过滤-----------------------------------------------------------------------------------------------
	protected $insertFields = array('name','title','type','status','condition','menu','admin','SecurityForm');
	protected $updateFields = array('name','title','type','status','condition','menu','admin','SecurityForm');
	
	
	//字段检查-----------------------------------------------------------------------------------------------
	protected $_validate = array(
		array('title','require','请输入权限名称！'),
		array('name','require','请输入权限地址！'),
	);
	
	//数据过滤-----------------------------------------------------------------------------------------------
	function FormatData(){
		$data['id']=I('get.id',0,'int');
		$data['title']=I('post.title');
		$data['name']=I('post.name');
		$data['condition']=I('post.condition');
		$data['type']=I('post.type',1,'int');
		$data['admin']=I('post.admin',1,'int');
		$data['status']=I('post.status',0,'int');
		$data['SecurityForm']=I('post.SecurityForm');
		$data['menu']=I('post.menu');
		return $data;
	}
	
}

?>